import request from '@/config/axios'

/** 宣教分类信息 */
export interface PublicityEducationCls {
          id: number; // 宣教分类ID
          name?: string; // 分类名
  }

// 宣教分类 API
export const PublicityEducationClsApi = {
  // 查询宣教分类分页
  getPublicityEducationClsPage: async (params: any) => {
    return await request.get({ url: `/business/publicity-education-cls/page`, params })
  },

  // 查询所有宣教分类
  getPublicityEducationClsAll: async () => {
    return await request.get({ url: `/business/publicity-education-cls/all` })
  },

  // 查询宣教分类详情
  getPublicityEducationCls: async (id: number) => {
    return await request.get({ url: `/business/publicity-education-cls/get?id=` + id })
  },

  // 新增宣教分类
  createPublicityEducationCls: async (data: PublicityEducationCls) => {
    return await request.post({ url: `/business/publicity-education-cls/create`, data })
  },

  // 修改宣教分类
  updatePublicityEducationCls: async (data: PublicityEducationCls) => {
    return await request.put({ url: `/business/publicity-education-cls/update`, data })
  },

  // 删除宣教分类
  deletePublicityEducationCls: async (id: number) => {
    return await request.delete({ url: `/business/publicity-education-cls/delete?id=` + id })
  },

  /** 批量删除宣教分类 */
  deletePublicityEducationClsList: async (ids: number[]) => {
    return await request.delete({ url: `/business/publicity-education-cls/delete-list?ids=${ids.join(',')}` })
  },

  // 导出宣教分类 Excel
  exportPublicityEducationCls: async (params) => {
    return await request.download({ url: `/business/publicity-education-cls/export-excel`, params })
  },
}
